home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / menu-methods / xdg-desktop-entry-spec-dirs < prev    next >
Encoding:
Text File  |  2010-01-17  |  1.3 KB  |  60 lines

  1. #!/usr/bin/install-menu
  2. # xdg desktop entry spec - directory generation
  3. # http://www.freedesktop.org/Standards/desktop-entry-spec
  4. # Copyright 2004 - Chris Cheney
  5. # Licensed under the GNU General Public License, version 2.
  6.  
  7. !include lang.h
  8. !include menu.h
  9.  
  10. compat="menu-2"
  11.  
  12. outputencoding="UTF-8";
  13. outputlanguage="C";
  14.  
  15. function section() =
  16.     "Name=" title() "\n"
  17.     forall(sections_translations(),"lang",
  18.         "Name[" $lang "]=" translate($lang,title())
  19.              "\n");
  20.  
  21. function comment() =
  22.     "Comment=" $longtitle "\n"
  23.     forall(sections_translations(),"lang",
  24.         "Comment[" $lang "]=" translate($lang,$longtitle)
  25.              "\n");
  26.  
  27. function DirEntry() =
  28.     "[Desktop Entry]\n"
  29.     "Type=Directory\n"
  30.     "Encoding=UTF-8\n"
  31.     section()
  32.     ifnempty($longtitle, comment())
  33.     "Icon=" ifelse(icon(),icon(), 
  34.                       "debian" replacewith(tolower($section),"/ ","--")) "\n";
  35.  
  36. supported;
  37.  x11 = ;
  38.  text = ;
  39. endsupported;
  40.  
  41. startmenu = "";
  42. endmenu = "";
  43. submenutitle = DirEntry();
  44.  
  45. treewalk = "M";
  46.  
  47. genmenu = ifempty($command,tolower("debian" replacewith($section,"/ ","--") ".directory"));
  48.  
  49. rootsection = "";
  50.  
  51. prerun     = "rm -rf  '" prefix() "'";
  52.  
  53. removemenu = "rm -rf  '" prefix() "'";
  54.  
  55. preoutput = "";
  56.  
  57. rootprefix = "/var/lib/menu-xdg/desktop-directories/menu-xdg";
  58.  
  59. userprefix = ".local/share/desktop-directories/menu-xdg";
  60.